package com.lb.anno;

import java.beans.Transient;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @Author: zhangjun
 * @Date: 2020/5/21 10:31
 * @Description: 自定义性别注解
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Sex {
    public enum GenderType {
        Male("男"),
        Female("女");
        private String genderStr;

        private GenderType(String arg) {
            this.genderStr = arg;
        }

        @Override
        public String toString() {
            return genderStr;
        }
    }

    GenderType gender() default GenderType.Male;
}
